package gui.entity;

import generated.domain.room.Room;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertySource;

public class RoomEntity implements IAdaptable {
	private Room room;
	private Object roomElementPropertySource;

	public RoomEntity(Room pRoom) {
		room = pRoom;
	}

	public Object getAdapter(Class adapter) {
		if (adapter == IPropertySource.class) {
			if (roomElementPropertySource == null) {
				roomElementPropertySource = new RoomElementPropertySource(this);
			}
			return roomElementPropertySource;
		}
		return null;
	}

	/**
	 * @return the room
	 */
	public Room getRoom() {
		return room;
	}
}